}
wfProfileOut( $fname );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
-
+
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
$ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
} else {
$ret = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' );
}
-
+
return "<div class='noarticletext'>$ret</div>";
} else {
$this->loadContent( $noredir );
if ( $this->mContentLoaded ) {
return $this->mContent;
}
-
+
$dbr =& $this->getDB();
$fname = 'Article::fetchContent';
$redir = $sk->makeKnownLink( $this->mRedirectedFrom, '', 'redirect=no' );
$s = wfMsg( 'redirectedfrom', $redir );
$wgOut->setSubtitle( $s );
-
+
// Check the parser cache again, for the target page
if( $pcache ) {
if( $wgOut->tryParserCache( $this, $wgUser ) ) {
$wgOut->setArticleBodyOnly(true);
$this->view();
}
-
+
function purge() {
global $wgUser, $wgRequest, $wgOut, $wgUseSquid;
wfProfileOut( $fname );
return false;
}
-
+
$this->mGoodAdjustment = (int)$this->isCountable( $text );
$this->mTotalAdjustment = 1;
'minor_edit' => $isminor,
'text' => $text
) );
-
+
$dbw->immediateCommit();
$dbw->begin();
$revisionId = $revision->insertOn( $dbw );
$lastRevision, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
$revisionId );
$dbw->commit();
-
+
// Update caches outside the main transaction
Article::onArticleEdit( $this->mTitle );
}
$urls = array();
# Invalidate caches of all articles using this article as a template
-
+
# Template namespace
# Purge all articles linking here
$titles = $this->mTitle->getTemplateLinksTo();
$fname = 'Article::showArticle';
wfProfileIn( $fname );
-
+
# Output the redirect
if( $this->isRedirect( $text ) )
$r = 'redirect=no';
else
$r = '';
$wgOut->redirect( $this->mTitle->getFullURL( $r ).$sectionanchor );
-
+
wfProfileOut( $fname );
}
$form = new ProtectionForm( $this );
$form->show();
}
-
+
/**
* action=unprotect handler (alias)
*/
function unprotect() {
$this->protect();
}
-
+
/**
* Update the article's restriction field, and leave a log entry.
*
$flat = Article::flattenRestrictions( $limit );
$protecting = ($flat != '');
-
+
if( wfRunHooks( 'ArticleProtect', array( &$this, &$wgUser,
$limit, $reason ) ) ) {
}
return true;
}
-
+
/**
* Take an array of page restrictions and flatten it to a string
* suitable for insertion into the page_restrictions field.
$wgOut->sysopRequired();
return;
}
-
+
if( wfReadOnly() ) {
$wgOut->readOnlyPage();
return;
$fname = 'Article::editUpdates';
wfProfileIn( $fname );
-
+
# Parse the text
$options = new ParserOptions;
$poutput = $wgParser->parse( $text, $this->mTitle, $options, true, true, $newid );
if ( 0 == mt_rand( 0, 999 ) ) {
# Periodically flush old entries from the recentchanges table.
global $wgRCMaxAge;
-
+
$dbw =& wfGetDB( DB_MASTER );
$cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
$recentchanges = $dbw->tableName( 'recentchanges' );
function onArticleDelete( $title ) {
global $wgMessageCache;
-
+
$title->touchLinks();
-
+
if( $title->getNamespace() == NS_MEDIAWIKI) {
$wgMessageCache->replace( $title->getDBkey(), false );
}
*/
function onArticleEdit( $title ) {
global $wgUseSquid, $wgPostCommitUpdateList, $wgUseFileCache;
-
+
$urls = array();
-
+
// Template namespace? Purge all articles linking here.
// FIXME: When a templatelinks table arrives, use it for all includes.
if ( $title->getNamespace() == NS_TEMPLATE) {